#include "TCP_Server.h"

using namespace std;

int main(int argc, char const *argv[])
{
    TCPServer server(8080);
    if (server.start()) {
        server.acceptClient();
        string msg;
        server >> msg;  // 从客户端接收数据
        cout << "从客户端接收到: " << msg << endl;
        server << "Hello from server!";  // 向客户端发送数据
    }
    
    return 0;
}
